package com.sbtr.common.file.dto;


import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@Accessors(chain = true)
public class FileDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "数据保存位置，自动生成")
    private String bucketDir;

    @ApiModelProperty(value = "数据全路径，自动生成")
    private String path;

    @ApiModelProperty(value = "文件名字")
    private String fileName;

    @ApiModelProperty(value = "文件别名")
    private String fileName2;

    @ApiModelProperty(value = "文件描述")
    private String fileDesc;

    @ApiModelProperty(value = "文件类型")
    private String fileType;

    @ApiModelProperty(value = "模块类型")
    private String model;

    @ApiModelProperty(value = "文件大小")
    private String fileSize;

    @ApiModelProperty(value = "路径类型,上传:upload(默认),模型:sample")
    private String pathType;

    @ApiModelProperty(value = "创建者")
    private String creater;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")// 后台传数据到前台
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") //前台传数据到后台
    private Date createTime;

    //指定
    public FileDto(String model){
        this.model=model;
    }

}
